﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:Fluent="clr-namespace:Fluent">
	     <ControlTemplate TargetType="{x:Type ComboBoxItem}" x:Key="noneditComboboxItemControlTemplate">
          <Grid Background="{DynamicResource TransparentBrush}">
            <Border x:Name="hoverBorder" BorderThickness="1" Visibility="Collapsed">
            	<Border.Background>
            		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}}" Opacity="0.12"/>
				</Border.Background>
              <Border Height="Auto" BorderThickness="1">
              	<Border.Background>
            		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}}" Opacity="0.12"/>
				</Border.Background>
			  </Border>
            </Border>
            <Border x:Name="selectedBorder" BorderThickness="1" Visibility="Collapsed">
            	<Border.Background>
            		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}}" Opacity="0.2"/>
				</Border.Background>
              <Border Height="Auto" BorderThickness="1" >
              	<Border.Background>
            		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}}" Opacity="0.2"/>
				</Border.Background>         
			  </Border>
            </Border>
            <ContentPresenter x:Name="contentPresenter" Margin="3" Opacity="1"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
            </Trigger>            
            <Trigger Property="IsSelected" Value="True">
              <Setter Property="Visibility" TargetName="selectedBorder" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsFocused" Value="True">
              <Setter Property="Visibility" TargetName="selectedBorder" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Visibility" TargetName="hoverBorder" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
	
  <Style x:Key="EditableComboBoxItemStyle" TargetType="{x:Type ComboBoxItem}">
    <Setter Property="Template" Value="{StaticResource noneditComboboxItemControlTemplate}"/>
    <Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}"/>
  </Style>

  <Style x:Key="NonEditableComboBoxItemStyle" TargetType="{x:Type ComboBoxItem}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ComboBoxItem}" x:Name="noneditComboboxItem">
          <Grid Background="{DynamicResource TransparentBrush}">
            <Border x:Name="hoverBorder" BorderThickness="1" Visibility="Collapsed">
            	<Border.Background>
            		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}}" Opacity="0.12"/>
				</Border.Background>
              <Border Height="Auto" BorderThickness="1">
              	<Border.Background>
            		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}}" Opacity="0.12"/>
				</Border.Background>         
			  </Border>
            </Border>
            <Border x:Name="selectedBorder" BorderThickness="1" Visibility="Collapsed">
            	<Border.Background>
            		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}}" Opacity="0.2"/>
				</Border.Background>
              <Border Height="Auto" BorderThickness="1">
              	<Border.Background>
            		<SolidColorBrush Color="{Binding RibbonThemeColor.Color, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Fluent:MetroWindow}}}" Opacity="0.2"/>
				</Border.Background>         
			  </Border>
            </Border>
            <ContentPresenter x:Name="contentPresenter" Margin="3" Opacity="1"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Opacity" TargetName="contentPresenter" Value="0.5"/>
            </Trigger>            
            <Trigger Property="IsFocused" Value="True">
              <Setter Property="Visibility" TargetName="selectedBorder" Value="Visible"/>
            </Trigger>
			<Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Visibility" TargetName="hoverBorder" Value="Visible"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="FocusVisualStyle" Value="{DynamicResource ControlStyleEmptyFocus}"/>
  </Style>
</ResourceDictionary>